UPSTREAM PR #17630: common: improve verbosity level definitions#377
UPSTREAM PR #17630: common: improve verbosity level definitions#377
Conversation
|
Explore the complete analysis inside the Version Insights Performance Analysis Summary: PR #377 - Logging Verbosity ImprovementsOverviewPR #377 refactors the logging system from a 3-level to a 5-level hierarchy, introducing structured log levels (OUTPUT=0, ERROR=1, WARN=2, INFO=3, DEBUG=4). The changes modify 5 files with 43 additions and 16 deletions, primarily affecting logging infrastructure in Key FindingsPerformance-Critical Areas Impact: The changes do not directly modify any functions in the performance-critical modules (Model Processing, Token Processing, Memory Management, or Batch Processing). The logging refactoring affects infrastructure code only. No changes were detected in Inference Performance: Tokens per second remains unaffected. The core tokenization and inference functions ( Power Consumption: Analysis across 16 binaries shows negligible impact. The largest changes are Observed Performance Variations: The performance analysis identified regressions in STL template functions (vector accessors showing 195 ns overhead, swap operations at 171 ns overhead). However, these regressions are unrelated to PR #377. They stem from compiler optimization and template instantiation issues in a different code path, not from the logging configuration changes introduced in this PR. Actual PR Impact: The logging changes introduce a switch statement in |
6eae205 to
565a9d5
Compare
105e379 to
1bd5bdc
Compare
Mirrored from ggml-org/llama.cpp#17630
(This change is part of the plan to use server code inside CLI)
The current log verbosity is not very useful as it only has 3 levels: (-1) logs nothing, (0) default, (1) debug
This PR adds more hierarchy so that "the higher verbosity number, more stuff get logged":
For CLI and most applications, the output (for example, generated text, json, csv, etc) can be written using
LOG_LEVEL_OUTPUT, which is equivalent to theLOG(...)macroThe default verbosity for future CLI application (server based) will ideally be ERROR, this is because WARN also log some redundant stuff in the middle of the conversation